﻿// namespace cs_basic_02
//{
//    internal class Program
//    {
//        class myClass
//        {
//            int F1, F3 = 25;
//            string F2, F4 = "hello";
//            void f1()
//            {
//                Console.WriteLine(F3);
//                Console.WriteLine(F4);
//            }
//        }
//        static void Main(string[] args)
//        {
//            //int var1 = null;
//            //Console.WriteLine($"{var1}");
//            //int var3 = 7, var4, var5 = 3;
//            //Console.WriteLine(var3+var5);
//            //int var6, var7 = 6;
//            //Console.WriteLine(var7);
//            //Console.WriteLine("{0}",myClass.F1);
//            myClass myClass1;
//            myClass1 = new myClass();
//        }
//    }
//}


//namespace cs_basic_02
//{
//    class Player
//    {
//        public string name;
//        int age;
//    }
//    class Card
//    {
//        int num;
//    }
//    internal class Program
//    {
//        static void Main()
//        {
//            Player player1 = new Player();
//            Player player2 = new Player();
//            Player player3 = new Player();
//            Card card = new Card();
//            Console.WriteLine("你已经掌握对象的声明和初始化操作");
//            player1.name = "123456";
//            Console.WriteLine(player1.name);
//        }
//    }
//}

namespace cs_basic_02
{
    class DaysTemp
    {
        public int High, Low;
        public int Average()
        {
            return (High + Low)/2;
        }
    }
    internal class Program
    {
        static void Main()
        {
            DaysTemp t1 = new DaysTemp();
            DaysTemp t2 = new DaysTemp();

            t1.High = 20;t1.Low = 10;
            t2.High = 30;t2.Low = 20;
            Console.WriteLine("t1:{0},{1},{2}",t1.Low,t1.High,t1.Average());
            Console.WriteLine("t1:{0},{1},{2}", t2.Low, t2.High, t2.Average());

        }
    }
}